# -*- coding: utf-8 -*-
# File : scheduler.py
# Author: taoyahui
# Date : 2021/3/23

from apscheduler.schedulers.blocking import BlockingScheduler
from datetime import datetime
import inventory_discovery


def add_inventory_discovery(scheduler):
    scheduler.add_job(inventory_discovery.inventory_discovery, "interval", seconds=60)


def my_clock():
    print("Hello, this time is %s" % datetime.now())


def my_scheduler():
    scheduler = BlockingScheduler()
    add_inventory_discovery(scheduler)
    scheduler.start()


if __name__ == '__main__':
    my_scheduler()
